package com.sense.kukoo.common.repo.kv.speed

import com.sense.kukoo.common.media.watcher.UserWatcher
import com.sense.kukoo.common.repo.kv.KukooKeyValueManager
import com.tencent.mmkv.MMKV

class SpeedImpl(val mmkv: MMKV) {

    fun set(speed: Float) {
        mmkv.encode(KukooKeyValueManager.KEY_SPEED, speed)
    }

    fun get(): Float = mmkv.decodeFloat(KukooKeyValueManager.KEY_SPEED, UserWatcher.MusicStateWatcher.SPEED_1P0)
}